#include <iostream>
using namespace std;

class Time
{
public:
    Time(int h, int m, int s, int d = 0)
    {
        hours = h;
        minutes = m;
        seconds = s;
        days = d;
    }

    void printTime()
    {
        cout << hours << ":" << minutes << ":" << seconds << endl;
    }

    Time operator+(Time &t)
    {
        this->seconds += t.seconds;
        this->minutes += t.minutes;
        this->hours += t.hours;

        if (this->seconds >= 60)
        {
            this->minutes += this->seconds / 60;
            this->seconds = this->seconds % 60;
        }
        if (this->minutes >= 60)
        {
            this->hours += this->minutes / 60;
            this->minutes = this->minutes % 60;
        }
        if (this->hours >= 24)
        {
            cout << "new days" << endl;
            this->days += this->hours / 24;
            this->hours = this->hours % 24;
        }
        return Time(this->hours, this->minutes, this->seconds, this->days);
    }

private:
    int days;
    int hours, minutes, seconds;
};

int main()
{
    Time t1(11, 12, 53);
    Time t2(4, 5, 46);
    Time t3 = t1 + t2;
    t3.printTime();

    Time t4(9, 18, 20);
    Time t5(17, 18, 45);
    t4 = t4 + t5;
    t4.printTime();

    return 0;
}